(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

+(a, b) → +(b, a)
+(a, +(b, z)) → +(b, +(a, z))
+(+(x, y), z) → +(x, +(y, z))
f(a, y) → a
f(b, y) → b
f(+(x, y), z) → +(f(x, z), f(y, z))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
Tuples:

+'(a, b) → c(+'(b, a))
+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
S tuples:

+'(a, b) → c(+'(b, a))
+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
K tuples:none
Defined Rule Symbols:

+, f

Defined Pair Symbols:

+', F

Compound Symbols:

c, c1, c2, c5

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing nodes:

+'(a, b) → c(+'(b, a))

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
Tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
S tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
K tuples:none
Defined Rule Symbols:

+, f

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2, c5

(5) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
We considered the (Usable) Rules:

f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
And the Tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = [4] + [2]x1 + x2   
POL(+'(x1, x2)) = [2]x1   
POL(F(x1, x2)) = [2] + [4]x1   
POL(a) = 0   
POL(b) = 0   
POL(c1(x1, x2)) = x1 + x2   
POL(c2(x1, x2)) = x1 + x2   
POL(c5(x1, x2, x3)) = x1 + x2 + x3   
POL(f(x1, x2)) = [1]   

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
Tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
S tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
K tuples:

+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
Defined Rule Symbols:

+, f

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2, c5

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
We considered the (Usable) Rules:

f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
And the Tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(+(x1, x2)) = [2] + [3]x1 + x2   
POL(+'(x1, x2)) = [2]x1·x2 + [2]x12   
POL(F(x1, x2)) = [1] + x1 + [3]x12   
POL(a) = [2]   
POL(b) = 0   
POL(c1(x1, x2)) = x1 + x2   
POL(c2(x1, x2)) = x1 + x2   
POL(c5(x1, x2, x3)) = x1 + x2 + x3   
POL(f(x1, x2)) = [1] + [3]x1   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

+(a, b) → +(b, a)
+(a, +(b, z0)) → +(b, +(a, z0))
+(+(z0, z1), z2) → +(z0, +(z1, z2))
f(a, z0) → a
f(b, z0) → b
f(+(z0, z1), z2) → +(f(z0, z2), f(z1, z2))
Tuples:

+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
S tuples:none
K tuples:

+'(+(z0, z1), z2) → c2(+'(z0, +(z1, z2)), +'(z1, z2))
F(+(z0, z1), z2) → c5(+'(f(z0, z2), f(z1, z2)), F(z0, z2), F(z1, z2))
+'(a, +(b, z0)) → c1(+'(b, +(a, z0)), +'(a, z0))
Defined Rule Symbols:

+, f

Defined Pair Symbols:

+', F

Compound Symbols:

c1, c2, c5

(9) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(10) BOUNDS(O(1), O(1))